<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table {
            /*块元素的水平居中对齐*/
            margin: 40px auto;
            width: 300px;
            border: 1px solid #000;
            /*合并表格边框线*/
            border-collapse: collapse;
            /*行元素或者文本内容的水平距中*/
            text-align: center;
        }

        th, td {
            border: 1px solid #000;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <th>姓名</th>
        <th>性别</th>
        <th>年龄</th>
    </tr>
    <tr>
        <td>张三</td>
        <td>男</td>
        <td>18</td>
    </tr>
    <tr>
        <td rowspan="2">李四</td>
        <td>男</td>
        <td>18</td>
    </tr>
    <tr>
        <!--        <td>李四</td>-->
        <td colspan="2">男</td>
        <!--        <td>18</td>-->
    </tr>
</table>
</body>
</html>
